home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / amac44d.zip / DSIZ13.QM < prev    next >
Text File  |  1992-04-26  |  9KB  |  177 lines

  1. *                               DSIZ13.QM
  2. *                Sort Directory Sizes in Descending Order
  3. *                        Written by Tom Hogshead
  4. *                                4/26/92
  5. *
  6. *  Key    Subfile              Description                         Bytes
  7. * =====  =============  ========================================= =======
  8. *
  9. *                       Sort Directory Sizes in Descending Order,
  10. * @(1) {e:\up\dsiz@1}   | - RIGHT Justify Number of Files' Column    185  |new
  11. * @(2) {e:\up\dsiz@2}   | - LEFT  Justify Number of Files' Column     85  |chg
  12. *
  13. *--eoi
  14.  
  15.  
  16. * DESCRIPTION
  17. * ------------
  18. * DSIZxx.QM are macros to list all directories in a current or a
  19. * specified drive, sorted by directory size in descending order.  The
  20. * number of files in each directory is also shown.
  21.  
  22.  
  23. * NOTE
  24. * -----
  25.  
  26. *     1)  DX.EXE Directory Extended is also required and can be found
  27. *         in AMAC-PRG.ZIP.
  28.  
  29. *     2)  These macros must only be run from the command line using
  30. *         either dsiz1.bat or dsiz2.bat, which must reside in current
  31. *         directory or in the path.
  32.  
  33. *     3)  These macros requires QEdit v2.15, but can be modified to
  34. *         work with QEdit v2.10 by removing the six commands
  35. *         setscreenoff, savesettings, setinsmode, setwordwrapmode,
  36. *         togglewordwrap and restoresettings, and invoking the macro
  37. *         with Insert ON and Word Wrap OFF.
  38.  
  39. *     4)  The unkill buffer MUST be set >0 with Qconfig.
  40.  
  41. *     5)  Total length of the "deepest and longest" directory name must
  42. *         not exceed 33 characters, e.g.
  43.  
  44. *                 "c:\aaaaa\ccccc\eeeee\ooooo\qqq\rr"
  45.  
  46. *         Macro truncates more than 33 characters.
  47.  
  48. *      6) Empty directories are not listed.
  49.  
  50. *      7) Contents of dsiz1.bat using @1 in dsiz@1.qm are:
  51. * ┌───────────────────────────────────────────────────────────────────────┐
  52. * │:                            dsiz1.bat                         4/23/92 │
  53. * │:      To run this batch file anywhere, change "Edsiz@1.mac" to:       │
  54. * │:                       "E[d:\path\]dsiz@1.mac"                        │
  55. * │:      where [d:\path\] is [drive:\directory\] for dsiz@1.mac location.│
  56. * │: %1 = Drive with colon.  Uses current drive if %1 is not specified.   │
  57. * │:      Requires DX.EXE (Directory Extended) and Q.EXE in path.         │
  58. * │:      Change c:\ to desired dsiz.ls location, preferably a ram drive. │
  59. * │                                                                       │
  60. * │       @echo off                                                       │
  61. * │       cls                                                             │
  62. * │       DX.EXE %1\ //t/st:1/he:1/at:hsd-/ff/ca:l/out:c:\dsiz.ls         │
  63. * │       Q.EXE c:\dsiz.ls  /Edsiz@1.mac                                  │
  64. * └───────────────────────────────────────────────────────────────────────┘
  65.  
  66. *      8) Contents of dsiz2.bat using @2 in dsiz@2.qm are:
  67. * ┌───────────────────────────────────────────────────────────────────────┐
  68. * │:                            dsiz2.bat                         4/23/92 │
  69. * │:      To run this batch file anywhere, change "Edsiz@2.mac" to:       │
  70. * │:                       "E[d:\path\]dsiz@2.mac"                        │
  71. * │:      where [d:\path\] is [drive:\directory\] for dsiz@2.mac location.│
  72. * │: %1 = Drive with colon.  Uses current drive if %1 is not specified.   │
  73. * │:      Requires DX.EXE (Directory Extended) and Q.EXE in path.         │
  74. * │:      Change c:\ to desired dsiz.ls location, preferably a ram drive. │
  75. * │                                                                       │
  76. * │       @echo off                                                       │
  77. * │       cls                                                             │
  78. * │       DX.EXE %1\ //t/st:1/he:1/at:hsd-/ff/ca:l/out:c:\dsiz.ls         │
  79. * │       Q.EXE c:\dsiz.ls  /Edsiz@2.mac                                  │
  80. * └───────────────────────────────────────────────────────────────────────┘
  81.  
  82.  
  83. *                            M A C R O S
  84. * ----------------------------------------------------------------------
  85. * @(1) Directory Sizes Sorted by Size in Descending Order,
  86. *      RIGHT Justify Number of Files' Column
  87. * ----------------------------------------------------------------------
  88. * See dsiz@1.qm for @1.
  89.  
  90. * This macro lists all directories in a current or a specified drive,
  91. * sorted by directory size in descending order.  The number of files in
  92. * each directory is also shown.  The macro can be invoked only at the
  93. * command line, not while editing, by running the batch file dsiz1.bat
  94. * which must be in the path or current directory.
  95.  
  96. *             SYNTAX:   dsiz1 [drive:] <enter>
  97.  
  98. * After the directory list is saved as [drive:]\dsiz.lst and loaded for
  99. * viewing, the temporary file c:\dsiz.ls (no "t" extension) is deleted.
  100.  
  101. * Macro @1 differs from @2 in that it RIGHT justifies the number of
  102. * files' column.
  103.  
  104. * Output of dsiz1.bat on my G: drive with @1:                   Note
  105. * -------------------------------------------            RIGHT Justification
  106. * Volume [G:MINISCRB_2] created: 92-Jan-20 14:34:16;             vvv
  107. * Directory of [g:\qpro\]                     2,214,991 bytes in  54 files
  108. * Directory of [g:\nu\]                       1,882,085 bytes in  45 files
  109. * Directory of [g:\qe\]                       1,400,421 bytes in  81 files
  110. * Directory of [g:\pcplus\]                   1,319,337 bytes in 158 files
  111. * Directory of [g:\slmr\]                       301,762 bytes in  15 files
  112. *                           < Lines omitted >
  113. * Directory of [g:\dos\]                        166,684 bytes in  19 files
  114. * Directory of [g:\pckwik\]                     118,310 bytes in  13 files
  115. * Directory of [g:\]                              2,043 bytes in   1 file
  116. * Directory of [g:\ibm\]                              0 bytes in   1 file
  117. *  14,310,447 bytes in 1,368 files.   15,069,184 bytes allocated (5% slack).
  118.  
  119. * 
  120. * ----------------------------------------------------------------------
  121. * @(2) Directory Sizes Sorted by Size in Descending Order,
  122. *      LEFT Justify Number of Files' Column
  123. * ----------------------------------------------------------------------
  124. * See dsiz@2.qm for @2.
  125.  
  126. * This macro lists all directories in a current or a specified drive,
  127. * sorted by directory size in descending order.  The number of files in
  128. * each directory is also shown.  The macro can be invoked only at the
  129. * command line, not while editing, by running the batch file dsiz2.bat
  130. * which must be in the path or current directory.
  131.  
  132. *             SYNTAX:   dsiz2 [drive:] <enter>
  133.  
  134. * After the directory list is saved as [drive:]\dsiz.lst and loaded for
  135. * viewing, the temporary file c:\dsiz.ls (no "t" extension) is deleted.
  136.  
  137. * Macro @2 differs from @1 in that it LEFT justifies the number of
  138. * files' column.
  139.  
  140. * Output of dsiz2.bat on my G: drive with @2                    Note
  141. * -------------------------------------------            LEFT Justification
  142. * Volume [G:MINISCRB_2] created: 92-Jan-20 14:34:16;             vvv
  143. * Directory of [g:\qpro\]                     2,214,991 bytes in 54 files
  144. * Directory of [g:\nu\]                       1,882,085 bytes in 45 files
  145. * Directory of [g:\qe\]                       1,400,421 bytes in 81 files
  146. * Directory of [g:\pcplus\]                   1,319,337 bytes in 158 files
  147. * Directory of [g:\slmr\]                       301,762 bytes in 15 files
  148. *                           < Lines omitted >
  149. * Directory of [g:\dos\]                        166,684 bytes in 19 files
  150. * Directory of [g:\pckwik\]                     118,310 bytes in 13 files
  151. * Directory of [g:\]                              2,043 bytes in 1 file
  152. * Directory of [g:\ibm\]                              0 bytes in 1 file
  153. *  14,310,447 bytes in 1,368 files.   15,069,184 bytes allocated (5% slack).
  154.  
  155. @0 macrobegin begline                   * Dummy to make this a txtfile
  156.  
  157. * Version History
  158. * ----------------
  159. * 1.1   - Prior version did not work if QEdit was set to insert        9/15/91
  160. *         line blocks below the cursor line.  This version works
  161. *         for all Qconfig settings and has the option to use the
  162. *         SetScreenOff command in v2.15.
  163. * 1.2   - QEdit 2.15 required for faster smoother operation.          10/11/91
  164. *       - In AMAC42.ZIP.                                               3/28/92
  165. * 1.3   - Changed descend sort routine to not be limited to            4/22/92
  166. *         300 directory entries.  Also is much faster.
  167. *       - Added @1 to right justify number of files' column.           4/23/92
  168. *       - Made subfiles dsiz@1.qm and dsiz@2.qm.                       4/24/92
  169. *       - Added dsiz1.bat and dsiz2.bat.  Removed dsiz.bat.            4/24/92
  170. *
  171. *
  172. *
  173. *
  174. *
  175. *
  176. *-- eof
  177.